package io.gitee.hefren.hhdemoapollo.conf;

import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import jakarta.annotation.Resource;
import org.springframework.cloud.context.scope.refresh.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @Date 2024/5/10
 * @Author lifei
 */
@Component
public class ApolloRefreshScopListener {

//    @Resource
//    private RefreshScope refreshScope;
//
//    @ApolloConfigChangeListener(value = "${apollo.bootstrap.namespaces}")
//    public void refresh(ConfigChangeEvent configChangeEvent) {
//        refreshScope.refresh(DemoPreConf.class);
//    }
}
